package com.boliq.lol.ui.news;

import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.boliq.lol.R;
import com.boliq.lol.adapter.NewsChessAdapter;
import com.boliq.lol.adapter.NewsMatchAdapter;
import com.boliq.lol.base.BaseFragment;
import com.boliq.lol.bean.NewsChessBean;
import com.boliq.lol.bean.NewsMatchBean;

public class NewsChessFragment extends BaseFragment {
    private RecyclerView mRecyclerView;
    private NewsChessAdapter cAdapter;
    @Override
    protected int rootLayout() {
        return R.layout.chess_mian_view;
    }
    @Override
    protected void initView(View view) {
        mRecyclerView = view.findViewById(R.id.rv_content_list2);
    }
    @Override
    protected void initData(){
        NewsChessBean c1=new NewsChessBean("11.4&11.5云顶之弈更新：天选系统小型调整",R.drawable.na1,"LoL","游戏日报","50.4万次");
        NewsChessBean c2=new NewsChessBean("盟物堂：国外大神完美比例还原超炫酷沙皇",R.drawable.na2,"LoL","英雄联盟盟物堂","323次");
        NewsChessBean c3=new NewsChessBean("3月5日18点不停机更新公告",R.drawable.na3,"LoL","英雄联盟官方 ","49.3万次");
        NewsChessBean c4=new NewsChessBean("弈招致胜：云顶速成大师诀窍之站位篇",R.drawable.na4,"LoL","北派攻略","5.1万次");
        NewsChessBean c5=new NewsChessBean("恭喜EDG达成LPL一万杀成就！",R.drawable.na5,"LoL","英雄联盟赛事官方","2539次");
        cAdapter = new NewsChessAdapter();
        cAdapter.addData(c1);
        cAdapter.addData(c2);
        cAdapter.addData(c3);
        cAdapter.addData(c4);
        cAdapter.addData(c5);
    }

    @Override
    protected void bindEvent() {

    }
    @Override
    protected void bindData() {
        super.bindData();
        mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        mRecyclerView.setAdapter(cAdapter);

    }
}
